var GameData = require("GameData");


cc.Class({
    extends: cc.Component,

    properties: {

        mScoreLabel: cc.RichText,
        mDepthLabel: cc.RichText,

    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

    },

    // update (dt) {},
    hide(){
        this.node.active = false;
    },

    show() {
        this.node.active = true;
        this.mScoreLabel.string = "<color=ffd700>" + GameData.instance.score + "</c>"
        this.mDepthLabel.string = "<color=#00ff00>深度:" + GameData.instance.depth.toFixed(2) + "</c>"
    }

});
